<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script>
    function fn1(){
        console.log(111);
        fn2();
    }
    fn1();

    function fn2(){
        console.log(22);
    }

    //用户输入年份.输出当前年份的2月份的天数。
    // function Year(){
    //     var flag = false;
    //     if(year % 4 ==0 &&year %100 !=0 || year %400==0){
    //         flag = true;
    //     }
    //     if(flag == true){
    //         return 29;
    //     }else return 28;
    // }
    // var year = prompt('输入年份');
    // console.log(Year(year));

    function Year(year){
        var flag = false;
        if(year % 4 ==0 &&year %100 !=0 || year %400==0){
            flag = true;
        }
        return flag
    }

    function getRunYear(year){
        var year = prompt('输入年份');
        if(Year(year)==true){
            return 29;
        }else return 28;
    }
    console.log(getRunYear());
</script>
<body>
    
</body>
</html>